<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
%>
<jsp:include page="/share/top.jsp" />
<SCRIPT language="javascript">
    	function linkOnClick(formName, serCode)
    	{
    		if(window.confirm('确实要删除该服务信息？')){
    			var form = document.forms[formName];
    			form.action="<%=path%>/serviceDim.do?method=removeTblServiceDim&serCode=" + serCode;
    			form.submit();
    		}    			
    	}
    function queryOnclick(){
		document.forms[0].submit();
	}
    
    layui.use(['layer','element','laypage'], function(args){
  		var layer = layui.layer; 
  		var totalPage = parseInt("${pr.totalPage}");
    	var currPage = parseInt("${pr.currPage}");
    	layui.laypage({
			cont: 'page'
			,pages: Math.ceil(totalPage)
			,curr:currPage
			,jump: function(row, first){
				if(!first){
					document.location.href='<%=path%>/alertctrl/queryAlarm.x?page='+row.curr;
				}
			}
		});
	}); 
</SCRIPT>
<form action="<%=path%>/alertctrl/queryAlarm.x" method="post">

    <span class="searchbox">发布地点<input type="text" name="createUsr" class="searchtxt" value="<c:out value='${createUsr }'/>" /></span>
    &nbsp&nbsp
    <span class="searchbox">报警类型
    	<select name="type">
    		<option value="">请选择报警类型</option>
    		<option value="1" <c:if test="${type=='1' }"> selected="selected"</c:if>>紧急报警</option>
    		<option value="2" <c:if test="${type=='2' }"> selected="selected"</c:if>>煤气报警</option>
    		<option value="3" <c:if test="${type=='3' }"> selected="selected"</c:if>>红外1报警</option>
    		<option value="4" <c:if test="${type=='4' }"> selected="selected"</c:if>>红外2报警</option>
    	</select>
    </span>
	&nbsp&nbsp
    <input type="button" class="layui-btn layui-btn-small -layui-btn-normal" value="查询" onclick="queryOnclick();"/>

    <div class="table-responsive">
      <table class="table layui-table" cellpadding="0" cellspacing="0">
        <thead>
        <tr>
            <th class="t1">报警信息编号</th>
            <th class="t2">报警类型</th>
            <th class="t3">发布地点</th>
            <th class="t4">报警时间</th>
          </tr>
        </thead>
     <tbody>
     	<c:forEach var="TblServiceDimBo" items="${tblServiceDims}" varStatus="e">
          <tr <c:if test="${e.count%2==1}"> class="split" </c:if>>
            <td class="t1"><c:out value="${TblServiceDimBo.serCode}" /></td>
            <td class="t2"><c:choose>
				<c:when test="${TblServiceDimBo.type =='1'}">紧急报警</c:when>
				<c:when test="${TblServiceDimBo.type =='2'}">煤气报警</c:when>
				<c:when test="${TblServiceDimBo.type =='3'}">红外1报警</c:when>
				<c:when test="${TblServiceDimBo.type =='4'}">红外2报警</c:when>
				<c:otherwise>其他警报</c:otherwise>
				</c:choose></td>
			<td class="t3"><c:out value="${TblServiceDimBo.createUsr}" /></td>
			<td class="t4"><c:out value="${TblServiceDimBo.createTime}" /></td>
          </tr>
        </c:forEach>
     </tbody>
    </table>
   </div>   
   <div id="page"></div>
  </div>

</div>
</form>
<jsp:include page="/share/foot.jsp" />
